$ () ->
	$(".logout_btn").click (e) ->
		$.get "/api/admin/logout", (res) ->
			if res.status.errCode is 0
				window.location.href = "/admin/login"
			else
				alert res.status.message


	$(".name").click (e) ->
		$(".update_password_div").toggle()